const { contextBridge, ipcRenderer } = require('electron/renderer')

contextBridge.exposeInMainWorld('electronAPI', {
  openFile: () => ipcRenderer.invoke('dialog:openFile'),
  setIPAdress: (filePath, key, value) => 
    ipcRenderer.invoke('updateEnvVariable', { 
      filePath, 
      key, 
      value 
    }),
  callNFCDriver: (inputJson) => ipcRenderer.invoke('call-nfc', inputJson)
})